
module.exports = function ($scope, $resource, $modalInstance, item, flag) {
    
    $scope.item = item;
    $scope.flag = flag;

    $scope.ok = function () {
        var para = {
            'company_code': item.company_code,
        }
        $resource('/api/ac/atc/auditReportService/setIssueStatus', {}, {}).save(para, function(res){
            if (res.errcode === 0) {
                $modalInstance.close();
            } else {
                toaster.error({title: '', body: '发放奖金失败, 请重试'});
            }
        });
    }


    $scope.close = function () {
        $modalInstance.dismiss('cancel');
    }


};